/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.compomics.spectrawl.view;

import com.compomics.spectrawl.controller.SpectrawlController;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

/**
 *
 * @author niels
 */
public class AnalyzeFilterPanel extends javax.swing.JPanel {
        
    /**
     * Creates new form AnalyzeFilterPanel
     */
    public AnalyzeFilterPanel() { 
        initComponents();
    }

    public JButton getAddBinButton() {
        return addBinButton;
    }

    public JButton getAddPeakButton() {
        return addPeakButton;
    }
        
    public JTextField getAddBinTextField() {
        return addBinTextField;
    }

    public JTextField getAddPeakTextField() {
        return addPeakTextField;
    }

    public JList getBinFilterList() {
        return binFilterList;
    }

    public JTextField getMassToleranceTextField() {
        return massToleranceTextField;
    }

    public JList getPeakFilterList() {
        return peakFilterList;
    }

    public JButton getRemoveBinButton() {
        return removeBinButton;
    }

    public JButton getRemovePeakButton() {
        return removePeakButton;
    }

    public JTextField getFilterThresholdTextField() {
        return filterThresholdTextField;
    }
            
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        peakFilterPanel = new javax.swing.JPanel();
        peakFilterScrollPane = new javax.swing.JScrollPane();
        peakFilterList = new javax.swing.JList();
        addPeakLabel = new javax.swing.JLabel();
        addPeakTextField = new javax.swing.JTextField();
        addPeakButton = new javax.swing.JButton();
        removePeakButton = new javax.swing.JButton();
        massToleranceLabel = new javax.swing.JLabel();
        massToleranceTextField = new javax.swing.JTextField();
        binFilterPanel = new javax.swing.JPanel();
        binFilterScrollPane = new javax.swing.JScrollPane();
        binFilterList = new javax.swing.JList();
        addBinLabel = new javax.swing.JLabel();
        addBinTextField = new javax.swing.JTextField();
        addBinButton = new javax.swing.JButton();
        removeBinButton = new javax.swing.JButton();
        filterThresholdLabel = new javax.swing.JLabel();
        filterThresholdTextField = new javax.swing.JTextField();

        setLayout(new java.awt.GridBagLayout());

        peakFilterPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("peak filter"));
        peakFilterPanel.setMinimumSize(new java.awt.Dimension(4, 4));
        peakFilterPanel.setPreferredSize(new java.awt.Dimension(4, 4));
        java.awt.GridBagLayout peakFilterPanelLayout = new java.awt.GridBagLayout();
        peakFilterPanelLayout.columnWidths = new int[] {0, 5, 0};
        peakFilterPanelLayout.rowHeights = new int[] {0, 10, 0, 10, 0, 10, 0};
        peakFilterPanel.setLayout(peakFilterPanelLayout);

        peakFilterScrollPane.setViewportView(peakFilterList);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        peakFilterPanel.add(peakFilterScrollPane, gridBagConstraints);

        addPeakLabel.setText("filter value");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        peakFilterPanel.add(addPeakLabel, gridBagConstraints);

        addPeakTextField.setPreferredSize(new java.awt.Dimension(6, 25));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        peakFilterPanel.add(addPeakTextField, gridBagConstraints);

        addPeakButton.setText("add");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        peakFilterPanel.add(addPeakButton, gridBagConstraints);

        removePeakButton.setText("remove");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        peakFilterPanel.add(removePeakButton, gridBagConstraints);

        massToleranceLabel.setText("mass tolerance");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        peakFilterPanel.add(massToleranceLabel, gridBagConstraints);

        massToleranceTextField.setPreferredSize(new java.awt.Dimension(6, 25));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        peakFilterPanel.add(massToleranceTextField, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 0.5;
        add(peakFilterPanel, gridBagConstraints);

        binFilterPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("bin filter"));
        binFilterPanel.setMinimumSize(new java.awt.Dimension(4, 4));
        binFilterPanel.setPreferredSize(new java.awt.Dimension(4, 4));
        java.awt.GridBagLayout binFilterPanelLayout = new java.awt.GridBagLayout();
        binFilterPanelLayout.columnWidths = new int[] {0, 5, 0};
        binFilterPanelLayout.rowHeights = new int[] {0, 10, 0, 10, 0, 10, 0};
        binFilterPanel.setLayout(binFilterPanelLayout);

        binFilterScrollPane.setViewportView(binFilterList);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.gridwidth = 3;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        binFilterPanel.add(binFilterScrollPane, gridBagConstraints);

        addBinLabel.setText("filter value");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        binFilterPanel.add(addBinLabel, gridBagConstraints);

        addBinTextField.setPreferredSize(new java.awt.Dimension(6, 25));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        binFilterPanel.add(addBinTextField, gridBagConstraints);

        addBinButton.setText("add");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        binFilterPanel.add(addBinButton, gridBagConstraints);

        removeBinButton.setText("remove");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 6;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        binFilterPanel.add(removeBinButton, gridBagConstraints);

        filterThresholdLabel.setText("intensity sum threshold");
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        binFilterPanel.add(filterThresholdLabel, gridBagConstraints);

        filterThresholdTextField.setPreferredSize(new java.awt.Dimension(6, 25));
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 4;
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
        gridBagConstraints.weightx = 0.5;
        binFilterPanel.add(filterThresholdTextField, gridBagConstraints);

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 0.5;
        add(binFilterPanel, gridBagConstraints);
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addBinButton;
    private javax.swing.JLabel addBinLabel;
    private javax.swing.JTextField addBinTextField;
    private javax.swing.JButton addPeakButton;
    private javax.swing.JLabel addPeakLabel;
    private javax.swing.JTextField addPeakTextField;
    private javax.swing.JList binFilterList;
    private javax.swing.JPanel binFilterPanel;
    private javax.swing.JScrollPane binFilterScrollPane;
    private javax.swing.JLabel filterThresholdLabel;
    private javax.swing.JTextField filterThresholdTextField;
    private javax.swing.JLabel massToleranceLabel;
    private javax.swing.JTextField massToleranceTextField;
    private javax.swing.JList peakFilterList;
    private javax.swing.JPanel peakFilterPanel;
    private javax.swing.JScrollPane peakFilterScrollPane;
    private javax.swing.JButton removeBinButton;
    private javax.swing.JButton removePeakButton;
    // End of variables declaration//GEN-END:variables
}
